package org.yaosheng.blog.dao;

import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.yaosheng.blog.po.Comment;

import java.util.List;

/**
 * Created by yaosheng on 2019/12/15.
 */
public interface CommentRepository extends JpaRepository<Comment,Long> {

    //Sort对Comment按时间排序
    List<Comment> findByBlogIdAndParentCommentNull(Long blogId, Sort sort);
}